{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "subtle-tuner",
   "metadata": {},
   "source": [
    "## 导入数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "breeding-documentation",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import seaborn as sns\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "plastic-personal",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Channel</th>\n",
       "      <th>Region</th>\n",
       "      <th>Fresh</th>\n",
       "      <th>Milk</th>\n",
       "      <th>Grocery</th>\n",
       "      <th>Frozen</th>\n",
       "      <th>Detergents_Paper</th>\n",
       "      <th>Delicassen</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>12669</td>\n",
       "      <td>9656</td>\n",
       "      <td>7561</td>\n",
       "      <td>214</td>\n",
       "      <td>2674</td>\n",
       "      <td>1338</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>7057</td>\n",
       "      <td>9810</td>\n",
       "      <td>9568</td>\n",
       "      <td>1762</td>\n",
       "      <td>3293</td>\n",
       "      <td>1776</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>6353</td>\n",
       "      <td>8808</td>\n",
       "      <td>7684</td>\n",
       "      <td>2405</td>\n",
       "      <td>3516</td>\n",
       "      <td>7844</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>13265</td>\n",
       "      <td>1196</td>\n",
       "      <td>4221</td>\n",
       "      <td>6404</td>\n",
       "      <td>507</td>\n",
       "      <td>1788</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>22615</td>\n",
       "      <td>5410</td>\n",
       "      <td>7198</td>\n",
       "      <td>3915</td>\n",
       "      <td>1777</td>\n",
       "      <td>5185</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Channel  Region  Fresh  Milk  Grocery  Frozen  Detergents_Paper  Delicassen\n",
       "0        2       3  12669  9656     7561     214              2674        1338\n",
       "1        2       3   7057  9810     9568    1762              3293        1776\n",
       "2        2       3   6353  8808     7684    2405              3516        7844\n",
       "3        1       3  13265  1196     4221    6404               507        1788\n",
       "4        2       3  22615  5410     7198    3915              1777        5185"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cm = pd.read_csv('Wholesale customers data.csv')\n",
    "cm.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "controversial-consistency",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 440 entries, 0 to 439\n",
      "Data columns (total 8 columns):\n",
      " #   Column            Non-Null Count  Dtype\n",
      "---  ------            --------------  -----\n",
      " 0   Channel           440 non-null    int64\n",
      " 1   Region            440 non-null    int64\n",
      " 2   Fresh             440 non-null    int64\n",
      " 3   Milk              440 non-null    int64\n",
      " 4   Grocery           440 non-null    int64\n",
      " 5   Frozen            440 non-null    int64\n",
      " 6   Detergents_Paper  440 non-null    int64\n",
      " 7   Delicassen        440 non-null    int64\n",
      "dtypes: int64(8)\n",
      "memory usage: 27.6 KB\n"
     ]
    }
   ],
   "source": [
    "cm.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "palestinian-direction",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Channel</th>\n",
       "      <th>Region</th>\n",
       "      <th>Fresh</th>\n",
       "      <th>Milk</th>\n",
       "      <th>Grocery</th>\n",
       "      <th>Frozen</th>\n",
       "      <th>Detergents_Paper</th>\n",
       "      <th>Delicassen</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>440.000000</td>\n",
       "      <td>440.000000</td>\n",
       "      <td>440.000000</td>\n",
       "      <td>440.000000</td>\n",
       "      <td>440.000000</td>\n",
       "      <td>440.000000</td>\n",
       "      <td>440.000000</td>\n",
       "      <td>440.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>1.322727</td>\n",
       "      <td>2.543182</td>\n",
       "      <td>12000.297727</td>\n",
       "      <td>5796.265909</td>\n",
       "      <td>7951.277273</td>\n",
       "      <td>3071.931818</td>\n",
       "      <td>2881.493182</td>\n",
       "      <td>1524.870455</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>0.468052</td>\n",
       "      <td>0.774272</td>\n",
       "      <td>12647.328865</td>\n",
       "      <td>7380.377175</td>\n",
       "      <td>9503.162829</td>\n",
       "      <td>4854.673333</td>\n",
       "      <td>4767.854448</td>\n",
       "      <td>2820.105937</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>55.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>25.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>3127.750000</td>\n",
       "      <td>1533.000000</td>\n",
       "      <td>2153.000000</td>\n",
       "      <td>742.250000</td>\n",
       "      <td>256.750000</td>\n",
       "      <td>408.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>8504.000000</td>\n",
       "      <td>3627.000000</td>\n",
       "      <td>4755.500000</td>\n",
       "      <td>1526.000000</td>\n",
       "      <td>816.500000</td>\n",
       "      <td>965.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>2.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>16933.750000</td>\n",
       "      <td>7190.250000</td>\n",
       "      <td>10655.750000</td>\n",
       "      <td>3554.250000</td>\n",
       "      <td>3922.000000</td>\n",
       "      <td>1820.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>2.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>112151.000000</td>\n",
       "      <td>73498.000000</td>\n",
       "      <td>92780.000000</td>\n",
       "      <td>60869.000000</td>\n",
       "      <td>40827.000000</td>\n",
       "      <td>47943.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          Channel      Region          Fresh          Milk       Grocery  \\\n",
       "count  440.000000  440.000000     440.000000    440.000000    440.000000   \n",
       "mean     1.322727    2.543182   12000.297727   5796.265909   7951.277273   \n",
       "std      0.468052    0.774272   12647.328865   7380.377175   9503.162829   \n",
       "min      1.000000    1.000000       3.000000     55.000000      3.000000   \n",
       "25%      1.000000    2.000000    3127.750000   1533.000000   2153.000000   \n",
       "50%      1.000000    3.000000    8504.000000   3627.000000   4755.500000   \n",
       "75%      2.000000    3.000000   16933.750000   7190.250000  10655.750000   \n",
       "max      2.000000    3.000000  112151.000000  73498.000000  92780.000000   \n",
       "\n",
       "             Frozen  Detergents_Paper    Delicassen  \n",
       "count    440.000000        440.000000    440.000000  \n",
       "mean    3071.931818       2881.493182   1524.870455  \n",
       "std     4854.673333       4767.854448   2820.105937  \n",
       "min       25.000000          3.000000      3.000000  \n",
       "25%      742.250000        256.750000    408.250000  \n",
       "50%     1526.000000        816.500000    965.500000  \n",
       "75%     3554.250000       3922.000000   1820.250000  \n",
       "max    60869.000000      40827.000000  47943.000000  "
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cm.describe()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "wooden-monitor",
   "metadata": {},
   "source": [
    "## 数据预处理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "sustained-strike",
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.preprocessing import Normalizer "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "limiting-zoning",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[0.70833271, 0.53987376, 0.42274083, 0.01196489, 0.14950522,\n",
       "        0.07480852],\n",
       "       [0.44219826, 0.61470384, 0.59953989, 0.11040858, 0.20634248,\n",
       "        0.11128583],\n",
       "       [0.39655169, 0.5497918 , 0.47963217, 0.15011913, 0.2194673 ,\n",
       "        0.48961931],\n",
       "       ...,\n",
       "       [0.36446153, 0.38846468, 0.7585445 , 0.01096068, 0.37223685,\n",
       "        0.04682745],\n",
       "       [0.93773743, 0.1805304 , 0.20340427, 0.09459392, 0.01531   ,\n",
       "        0.19365326],\n",
       "       [0.67229603, 0.40960124, 0.60547651, 0.01567967, 0.11506466,\n",
       "        0.01254374]])"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train_data = cm.iloc[:,2:]\n",
    "norm_train_data = Normalizer().fit_transform(train_data)\n",
    "norm_train_data"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "dietary-penny",
   "metadata": {},
   "source": [
    "## 适用轮廓系数找到最优K"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "mineral-motor",
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.cluster import KMeans \n",
    "from sklearn.metrics import silhouette_score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "lovely-milton",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\users\\administrator\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\seaborn\\_decorators.py:43: FutureWarning: Pass the following variables as keyword args: x, y. From version 0.12, the only valid positional argument will be `data`, and passing other arguments without an explicit keyword will result in an error or misinterpretation.\n",
      "  FutureWarning\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "Text(0, 0.5, 'score')"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEGCAYAAAB/+QKOAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAnxElEQVR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nAR8H/urBlbIo62pwznUq8es6oXL3r7l7nrsPJn4B+q/uflWD1Vp8fzWmrij2V/C+GWbWrf418UZhrzRYLYrP5HHriuIz6e5bgU1mdlow68PA6garNev+CnUsplbm/cDVwKrg/DXA14GBAO7+K+LjRn0EWAfsB65rJXV9HPismdUAB4DpYX+xEL+7ap7FW8fGgMfdfZG9e7DFucBvzWwdsIv4F1DYGlPX581sKlAT1DWzBepKqhXsr8bUFdX+6gf8MfieTSXegvhPZvYZiPQz2Zi6ovhMAnwOeMTM0oD1wHVh7i8NtSEiIkl1mFNMIiLSNAoIERFJSgEhIiJJKSBERCQpBYSIiCSlgBAJkZkNNrOG9/aLtAkKCBERSUoBIdJCzOyUYJC18VHXItIYHelJapHIBMMjzAdmuntx1PWINIYCQiR82cD/AR9z94Zj54i0WjrFJBK+KuAt4OyoCxFpCh1BiISvGvgo8JSZ7XX3R6MuSKQxFBAiLcDd9wXNe54OQmJB1DWJHI9GcxURkaR0DUJERJJSQIiISFIKCBERSUoBISIiSSkgREQkKQWEiIgkpYAQEZGk/j+8gYxU68my3QAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "clusters = [2,3,4,5,6]\n",
    "score=[]\n",
    "modle =[]\n",
    "\n",
    "for k in clusters:\n",
    "    kmeans_  = KMeans(n_clusters=k)\n",
    "    kmeans_.fit(norm_train_data)\n",
    "    score.append(silhouette_score(norm_train_data,kmeans_.labels_))\n",
    "    modle.append(kmeans_)\n",
    "    \n",
    "sns.lineplot(clusters,score)\n",
    "plt.xlabel('k')\n",
    "plt.ylabel('score')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "prescribed-gilbert",
   "metadata": {},
   "source": [
    "## 建模及可视化分析"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "painful-sword",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Fresh</th>\n",
       "      <th>Milk</th>\n",
       "      <th>Grocery</th>\n",
       "      <th>Frozen</th>\n",
       "      <th>Detergents_Paper</th>\n",
       "      <th>Delicassen</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.869573</td>\n",
       "      <td>0.174954</td>\n",
       "      <td>0.226061</td>\n",
       "      <td>0.224904</td>\n",
       "      <td>0.050075</td>\n",
       "      <td>0.074002</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.264083</td>\n",
       "      <td>0.479221</td>\n",
       "      <td>0.661907</td>\n",
       "      <td>0.134295</td>\n",
       "      <td>0.251450</td>\n",
       "      <td>0.105409</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      Fresh      Milk   Grocery    Frozen  Detergents_Paper  Delicassen\n",
       "0  0.869573  0.174954  0.226061  0.224904          0.050075    0.074002\n",
       "1  0.264083  0.479221  0.661907  0.134295          0.251450    0.105409"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "kmeans_ = modle[0]\n",
    "center = pd.DataFrame(kmeans_.cluster_centers_,columns=['Fresh','Milk','Grocery','Frozen','Detergents_Paper','Delicassen'])\n",
    "center"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "otherwise-madness",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.legend.Legend at 0x26d320e9f08>"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAOcAAADnCAYAAADl9EEgAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAWlUlEQVR4nO3deZgU1b3G8W/1AgMIzSKLAlIaY0RRRBZ3MYkbjmg0Imi8MbhdTa5BEhLLXL0plYutEWPidQ1RY9wFImqhJq64AhLAEGRRaVkUAYGCYZi1+/5RDQKyzNLdv1Pdv8/z9OMM0H3eceadU9VVdcrKZDIopcwTkQ6glNo5LadShtJyKmUoLadShtJyKmUoLadShtJyKmUoLadShtJyKmUoLadShopJB1CquWbNmtUlFotNAPpg7oSTBubV1dVd1r9//1UNeYKWU4VeLBab0K1bt96dO3deF4lEjDxZPJ1OW6tXrz5k5cqVE4CzGvIcU3/LKNUYfTp37rzB1GICRCKRTOfOnX2C2b1hz8ljHqUKJWJyMbfIZmxw57ScShlK9zlV0bEdr38uXy+VLJ/VkH83ceLEdmPGjNkvnU5z0UUXrRk3btzK5oyrM6dSOVBXV8fo0aP3mzp16qJFixb9e9KkSR1nzZpV1pzX1HIqlQNvvPFGm169elUfcsghNWVlZZlzzz137cSJE9s35zW1nErlwLJly1p07969ZsvnPXr0qFmxYkWL5rymllMpQ2k5lcqBnj17bjdTLl++fLuZtCm0nErlwODBgzelUqmyBQsWtKiqqrImT57c8Yc//OH65rymHkpRRaehhz5yKR6PM378+KWnn376QfX19Vx44YVrBgwYUNWc19RyKpUjw4cP94cPH+7n6vV0s1YpQ2k5lTKUllMpQ+k+p8Fsx4sAXYB9s4/uO3y8D9AKqCe4mDe9i49rgBXAZzs8lqaS5ZWF+4pUY2g5DWE7Xi+gf/ZxJHAoQf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cJyjillK6rlKLllBAckjkVOAoYBPQBoqKZvikNfEhwdcg7wGu6yVpYWk4TuInWBBeAbylrf2A/CneLxiqC1SHmEtyx7QNglh76kKXlNFWwz9oDsHd49ALaA22A1tv8t8UOr1ADVACbtnn4wGcEt8dbss1jpe4zmkfLWSyCMrcmOIyzCdfXWyKGnJZTKUPp9ZxKGUrLqZShtJxKGUrLqZShtJxKGUrLqZShtJxKGUrLqZShtJxKGUrLqZShtJxKGUrLqZShtJxKGUrLqZShtJxKGUrLqZShtJxKGUrLqZShtJxKGUrLqZShtJxKGUrLqZShtJxKGUrLqZShtJxKGUrLqZShtJxKGer/AXteaH5NkxKFAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "km_labels = pd.Series(kmeans_.labels_)\n",
    "sizes = km_labels.value_counts(1).values\n",
    "labels = km_labels.value_counts(1).index\n",
    "plt.pie(sizes,autopct='%.f%%')\n",
    "plt.legend(labels)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "appointed-asset",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(array([0, 1], dtype=int64), [Text(0, 0, '0'), Text(1, 0, '1')])"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAbvklEQVR4nO3de1RVdf7/8ecb1DBtWF5oKjGx+ZqGXI6IaDGW6ddL5mDa1Uylu6U2k+VkK0cNbU0Xq+8qWTW2Ku1bozRW5JRNRmYXl6VoaOINNOYrTivJTMOkFD+/P0B+SFxOdODA5vVYq7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oHmF0FjHDO3VK+PAHo75ybWmnM1vIxheXLu8vHfFPlWLcBt5Uv9gR2BupEhM7AN3WOEml8+rsZWN2ccxHVbWjU5lzOuUXAosZ8z5bCzLKdc4nBrkOkKv3dbDz+TLnsA7pWWo4sX1ftGDNrBYQDBwJRoIiI+MefQN8A9DCz7mbWBrgOWFFlzApgUvnrq4DVrq65HBERCag6p1ycc8fNbCrwLhAKvOCcyzWzNCDbObcCeB74XzPLB76lLPSlcWkqS5oq/d1sJHV+KCoiIs2DnhQVEfEIBbqIiEco0Ju5utoyiASLmb1gZvvLn1ORRqBAb8b8bMsgEiyLgRHBLqIlUaA3b/60ZRAJCufcR5Td9SaNRIHevHUB9lZaLixfJyItkAJdRMQjFOjNmz9tGUSkhVCgN2/+tGUQkRZCgd6MOeeOAyfbMmwHXnXO5Qa3KpEyZrYUWAf0NLNCM7s52DV5nR79FxHxCF2hi4h4hAJdRMQjFOgiIh6hQBcR8QgFuoiIRyjQRUQ8QoEuIuIR/w+Lplurp+xJaQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "center.plot(kind='bar')\n",
    "plt.xticks(rotation=0)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
